package constructor05;

public class Person {
    private String name;
    private int age;


    public Person(String name){
        System.out.println("一个参数的构造方法");
    }

    // 他是一个普通方法,而且普通方法一般不会和类重名
    public void Person(String name){
        System.out.println("被调用");

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
